package com.net.xpay.admin.secutiry;

import org.springframework.security.authentication.InsufficientAuthenticationException;

/**
  on 13/02/2018.
 */
public class WebInsufficientAuthException extends InsufficientAuthenticationException {
    private String errorCode; //出错的errorCode

    private String errorMessage; //出错的message

    WebInsufficientAuthException(String errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    @Override
    public String toString() {
        return "|WebInsufficientAuthException|errorCode=" + errorCode + "|errorMessage=" + errorMessage;
    }

    @Override
    public String getMessage() {
        return "|WebInsufficientAuthException|errorCode=" + errorCode + "|errorMessage=" + errorMessage;
    }
}
